local skel = fk.CreateSkill {
  name = "rmt__jiewang",
  tags = {Skill.Lord},
}

skel:addEffect(fk.CardUseFinished, {
  anim_type = "drawcard",
  can_trigger = function(self, event, target, player, data)
    return data.card and data.card.trueName == "slash" and player:hasSkill(skel.name) and target == player
    and #player:getCardIds("he") > 1
  end,
  on_cost = function(self, event, target, player, data)
    local room = player.room
    local cards = room:askToCards(player, {
      min_num = 2, max_num = 2, skill_name = skel.name, cancelable = true, include_equip = true,
      prompt = "#rmt__jiewang_ask",
    })
    if #cards > 0 then
      event:setCostData(self, cards)
      return true
    end
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    room:recastCard(event:getCostData(self), player, skel.name)
  end,
})

Fk:loadTranslationTable{
  ["rmt__jiewang"] = "皆望",
  [":rmt__jiewang"] = "主公技，你使用【杀】后，可以重铸两张牌。",
  ["#rmt__jiewang_ask"] = "皆望：是否选择两张牌重铸？",
}

return skel
